package com.homeproject.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.RootPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Home_Project implements EntryPoint {
	/**
	 * Template areas.
	 */
	private Panel header = null;

	/**
	 * This is the entry point method.
	 */
	@Override
	public void onModuleLoad() {
		RootPanel.get("header").add(this.getHeader());
	}

	/**
	 * Builds the page header.
	 */
	private Panel getHeader() {
		if (this.header == null) {
			this.header = new FlowPanel();
			this.header.add(Utils.getImage(Utils.LOGO_IMAGE_NAME));

			Label title = new Label("Home Project");
			this.header.add(title);
		}

		return this.header;
	}
}
